package com.example.layui.mapper;

import com.example.layui.pojo.Role;
import com.example.layui.pojo.User;
import com.example.layui.pojo.UserVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserMapper {
    public List<UserVo> queryByPage(@Param("user") UserVo user, @Param("from") Integer from, @Param("size") Integer size);

    public int count(UserVo user);

    public int delete(Integer id);

    public int addUser(UserVo user);

    public int update(UserVo user);

    List<Role> getRolesById(Integer id);

    User queryByName(String name);

    int addRole(@Param("uid") int uid, @Param("rid") int rid);

    int delRole(@Param("uid") int uid, @Param("rid") int rid);

    UserVo queryById(@Param("id") int id);

    int updateByLock(@Param("id") int id,@Param("name") String name,@Param("checked") boolean checked);

    void delRoleByUid(@Param("uid") int uid);

    List<UserVo> getALlBangke();
}
